package club.banyuan.oop.UserDemo;

import java.util.Arrays;

/**
 * @author edz
 * @version 1.0
 * @date 2020/11/18 上午10:59
 */
public class User {
    /**
     * 要求：
     * 1、首选登陆
     * public boolean login(User user){}
     * 2、如果登陆成功就显示所有的商品信息
     * public Product [] showAll(){}
     * 3、提供一个购买商品的功能
     * public void buy(String productID){}
     */
    private String userId;
    private String username;
    private String password;
    private String checkPassword;//二次密码验证
    private String uerAddress;
    private String iphone;
    //用户的银行账号
    //
    private Product[] products;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getCheckPassword() {
        return checkPassword;
    }

    public void setCheckPassword(String checkPassword) {
        this.checkPassword = checkPassword;
    }

    public String getUerAddress() {
        return uerAddress;
    }

    public void setUerAddress(String uerAddress) {
        this.uerAddress = uerAddress;
    }

    public String getIphone() {
        return iphone;
    }

    public void setIphone(String iphone) {
        this.iphone = iphone;
    }

    public Product[] getProducts() {
        return products;
    }

    public void setProducts(Product[] products) {
        this.products = products;
    }

    @Override
    public String toString() {
        return "User{" +
                "userId='" + userId + '\'' +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", checkPassword='" + checkPassword + '\'' +
                ", uerAddress='" + uerAddress + '\'' +
                ", iphone='" + iphone + '\'' +
                ", products=" + Arrays.toString(products) +
                '}';
    }
}
